package com.sumer.psychology.blog.domain.model;

import com.sumer.psychology.common.domain.model.AbstractDomainEvent;
import com.sumer.psychology.common.domain.model.Author;

/**
 * User: zhenguang.zhu
 * Date: 2014/9/3
 * Time: 8:33
 */
public class CategoryCreatedEvent extends AbstractDomainEvent {
    private CategoryId categoryId;
    private Author author;
    private String name;

    public CategoryCreatedEvent(CategoryId categoryId, Author author, String name) {
        super();
        this.categoryId = categoryId;
        this.author = authorFrom(author);
        this.name = name;
    }

    public CategoryId categoryId() {
        return categoryId;
    }

    public Author author() {
        return author;
    }

    public String name() {
        return name;
    }
}
